package ldh.serialize.type;

import java.io.IOException;

import ldh.serialize.BinarySerialized;
import ldh.serialize.io.ByteBuf;
import ldh.serialize.util.SerializedUtil;


public class ByteArraySerialized implements BinarySerialized<byte[]> {


	@Override
	public void write(ByteBuf out, byte[] bytes) throws IOException {
		SerializedUtil.writeBytes(out, bytes);
	}

	@Override
	public byte[] read(ByteBuf in) throws IOException {
		return SerializedUtil.readBytes(in);
	}

	@Override
	public Class<byte[]> getClassType() {
		return byte[].class;
	}
}
